package com.hzsd.zengbanyi.biaodan_text.utils;


import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;

import com.hzsd.zengbanyi.biaodan_text.bean.WorkDAO;
import com.hzsd.zengbanyi.biaodan_text.interfaces.InterfaceCallback;

public class StandardTextChange implements TextWatcher {
    private Context context;
    private View view;
    private WorkDAO dao;
    private String sampleId;

    public StandardTextChange(Context context, View view, String sampleId) {
        this.context = context;
        this.view = view;
        this.sampleId = sampleId;
        dao = new WorkDAO(context);
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count,
                                  int after) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
        // TODO Auto-generated method stub

    }

    @Override
    public void afterTextChanged(Editable s) {
        if (InterfaceCallback.textChangeCallback != null) {
            InterfaceCallback.textChangeCallback.getTextChange(view.getTag()
                    + "", s.toString());
        }

    }

}
